package com.xquant.common.engine.xPP.request.instrument;

/**
 * @author B946
 * @date 26/09/2020 14:18
 * @description:
 */
public class ProductFactory {

    private ProductFactory(){}

    public static IProduct getProduct(String productType){
        switch (productType){
            case "Vanilla":
                return new Vanilla();
            case "KnockOut":
            case "KnockIn":
            case "DoubleKnockOut":
            case "DoubleKnockIn":
                return new Barrier();
            default:
                throw new RuntimeException("不支持该类型期权的情景报价！");
        }
    }
}
